package com.zck.thumbup.service;

import com.zck.thumbup.entity.Thumb;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zck.thumbup.model.dto.thumb.DoThumbRequest;
import jakarta.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zhaochenkang
 * @since 2025-10-16
 */
public interface ThumbService extends IService<Thumb> {
    /**
     * 点赞
     * @param doThumbRequest
     * @param request
     * @return {@link Boolean }
     */
    Boolean doThumbByRedis(DoThumbRequest doThumbRequest, HttpServletRequest request);

    /**
     * 取消点赞
     * @param doThumbRequest
     * @param request
     * @return {@link Boolean }
     */
    Boolean undoThumbByRedis(DoThumbRequest doThumbRequest, HttpServletRequest request);


    /**
     * 是否点赞
     * @param blogId 博客id
     * @param userId 用户id
     * @return
     */
    Boolean hasThumb(Long blogId, Long userId);



}
